<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :maskClosable="false"
    switchFullscreen
    @ok="handleOk"    
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">
    <chg-fee-bill-form ref="realBillForm" v-bind:printBillData="printBillData" @ok="submitCallback" :disabled="disableSubmit"/>
  </j-modal>
</template>

<script>
  import ChgFeeBillForm from './ChgFeeBillForm'
  export default {
    name: 'ChgFeeBillModal',
    components: {
      ChgFeeBillForm
    },
    props: ["printBillData"],
    data() {
      return {
        title:'',
        visible: false,
        disableSubmit: false
      }
    },
    methods:{
      add () {
        this.visible=true
        this.$nextTick(()=>{
          //this.$refs.realBillForm.add();
        })
      },      
      close () {          
        this.visible = false;
      },
      handleOk () {
        this.$emit('modalBillFormOk');       
        this.close();
      },
      submitCallback(){
        //  this.$refs.realBillForm.handleOk();
        this.$emit('modalBillFormOk');
        this.visible = false;
      },
      handleCancel () {
        this.$emit('modalBillCancel');
        this.close()
      }
    }
  }
</script>

<style scoped>
</style>